	package com.cgy.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import util.PoiHandler;
@Data
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name = "student")
//学生信息表
public class Student {
	@Id//表示数据表中的主键
	@GeneratedValue(strategy = GenerationType.IDENTITY)//设置主键自增 
	@PoiHandler(excelHeader = "学生编号")
	private Integer sid;//学生编号
	@PoiHandler(excelHeader = "学生姓名")
	private String sname;//学生姓名
	@PoiHandler(excelHeader = "学生学号")
	@Column(name = "s_card_id",unique = true)
	private Integer sCardId;//学生学号
	@PoiHandler(excelHeader = "性别")
	private String ssex;
	@PoiHandler(excelHeader = "年龄")
	private Integer sage;
	@PoiHandler(excelHeader = "身份证号")
	@Column(name = "member_ship_id",unique = true)
	private String memberShipId;//身份证号
	@PoiHandler(excelHeader = "手机号")
	private String phone;//手机号
	@PoiHandler(excelHeader = "学生状态")
	private Integer status;//状态 
	@PoiHandler(excelHeader = "学生备注")
	private String remark;//状态
	@PoiHandler(excelHeader = "学生系别")
	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name="xid") 
	private Xibie xibie;
	
}
